//+------------------------------------------------------------------+
//|                                                         List.mqh |
//|                               Copyright 2016, STW Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, STW Software Corp."
#property link      "https://www.mql5.com"
#property strict
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
class List
  {
protected:
   template<typename T>
   T                *MyList[];
public:
                     List(void){};
                    ~List(void){};
   template<typename T>
   void Add(T &value)
     {
      int Size=ArraySize(MyList);
      ArrayResize(MyList,(Size+1));
      T MyValue=value;
      MyList[Size]=GetPointer(MyValue);
     };
   void Clear()
     {
      ArrayFree(MyList);
     };
   //template<typename T>
   //static T * getInstance()
   //{
   //   if(instance == NULL)
   //     {
   //      //instance=new T();
   //     }
   //     return instance;
   //};
  };
//+------------------------------------------------------------------+
